#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main()
{
    char a[10];
    char b[7] = "abcdefg";
    char * x;

    // strncpy_s would add one '\0' after the copied characters
    // so dest's minimal size: count+1
    strncpy_s(a, 2, b, 1);

    printf("a:%s\n", a);
    printf("b:%s\n", b);

    x = malloc(0);
    if (!x)
	return -1;

    *x = 'z' ;
    printf("x: %p, *x: 0x%08x\n", x, *(int*)x);


    return 0;
}
